#pragma once
#include "MetricLearner.h"

class PLSMetricLearner :
	public MultiVariateMetricLearner
{
public:
	PLSMetricLearner(KNNSimpleGeneralizer* p);
	virtual ~PLSMetricLearner(void);

	void transform(Observation newst, Action a); 
	void transformInMatlab(ANNpointArray& data, int size, Action a);

	int learnTransformation(ANNpointArray& data, ANNpointArray& targets, int size, int action); 
	void submitParams(int action); //copies the tmp w matrix to the actual one. 

public: 

	vector<	MatlabMatrix<double>* > w;		//we have only one w per action. xs = x*w

	MatlabMatrix<double>* threadW; 
};
